The snippets don't have context, so any rules that catch undefined
or unused stuff don't apply.
We currently disable those rules via command-line parameters. Including
it in the config instead will allow to re-use the run-eslint.sh wrapper.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3746>
N_: 'readonly',
},
},
+ }, {
+ // doc snippets, disable rules that depend on wider context
+ files: ['tmp.*/*.js'],
+ rules: {
+ 'no-undef': 'off',
+ 'no-unused-vars': 'off',
+ 'no-invalid-this': 'off',
+ },
},
]);